home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998…eptember: Technology Seed / September 98 ADC Seed CD.toast / FireWire 1.1 DR2 SDK / Source / OpenTransport / Interfaces / strlog.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-01-15  |  1.2 KB  |  64 lines  |  [TEXT/MPS ]

  1. /** Copyright (c) 1993  Mentat Inc.
  2.  ** strlog.h 4.3, last change 15 Apr 1994
  3.  **/
  4.  
  5. #ifndef _STRLOG_
  6. #define    _STRLOG_
  7.  
  8. #ifndef __OPENTRANSPORT__
  9. #include <OpenTransport.h>
  10. #endif
  11.  
  12. #if PRAGMA_ALIGN_SUPPORTED
  13. #pragma options align=mac68k
  14. #endif
  15.  
  16. struct log_ctl {
  17.     short    mid;
  18.     short    sid;
  19.     char    level;
  20.     short    flags;
  21.     long    ltime;
  22.     long    ttime;
  23.     int    seq_no;
  24. };
  25.  
  26. #define    SL_FATAL    0x1    /* Fatal error */
  27. #define    SL_NOTIFY    0x2    /* Notify the system administrator */
  28. #define    SL_ERROR    0x4    /* Pass message to error logger */
  29. #define    SL_TRACE    0x8    /* Pass message to tracer */
  30. #define    SL_CONSOLE    0x10    /* Print the message on the console */
  31. #define    SL_WARN        0x20    /* Warning */
  32. #define    SL_NOTE        0x40    /* Notice this message */
  33.  
  34. struct trace_ids {
  35.     short    ti_mid;
  36.     short    ti_sid;
  37.     char    ti_level;
  38. };
  39.  
  40. #ifndef MIOC_CMD
  41. #include <miioccom.h>
  42. #endif    /* MIOC_CMD */
  43.  
  44. #define    I_TRCLOG    MIOC_CMD(MIOC_STRLOG, 1)
  45. #define    I_ERRLOG    MIOC_CMD(MIOC_STRLOG, 2)
  46.  
  47. #define    LOGMSGSZ    128
  48.  
  49. #ifdef __cplusplus
  50. extern "C" {
  51. #endif
  52.  
  53. extern    int    strlog( int mid, int sid, int level, unsigned int flags, char* fmt, ...);
  54.  
  55. #ifdef __cplusplus
  56. }
  57. #endif
  58.  
  59. #if PRAGMA_ALIGN_SUPPORTED
  60. #pragma options align=reset
  61. #endif
  62.  
  63. #endif    /* _STRLOG_ */
  64.